﻿using Andromeda.Base.Application.UI.Windows.Forms;
using Andromeda.Forge.Common;
using ForgeIt.UserControls;

namespace ForgeIt.Forms.Solution
{
    /// <summary>
    /// 
    /// </summary>
    public partial class ForgeSolutionManager : BaseManager
    {
        /// <summary>
        /// 
        /// </summary>
        public ForgeSolutionManager()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="solution"></param>
        public void DataBind(FOSolution solution)
        {
            foSolutionUserControl1.DataBind(solution);
            DsProjectsFoSolutionExplorer.DataBind(solution,
                                                  FoSolutionExplorerUserControl.TypesFilter.DBProject |
                                                  FoSolutionExplorerUserControl.TypesFilter.DBClass |
                                                  FoSolutionExplorerUserControl.TypesFilter.DBProperty);
            BusProjectsFoSolutionExplorer.DataBind(solution, FoSolutionExplorerUserControl.TypesFilter.BusinessProject |
                                                  FoSolutionExplorerUserControl.TypesFilter.BusinessClass |
                                                  FoSolutionExplorerUserControl.TypesFilter.BusinessProperty |
                                                  FoSolutionExplorerUserControl.TypesFilter.BusinessValidation);
            WebProjectsFoSolutionExplorer.DataBind(solution, FoSolutionExplorerUserControl.TypesFilter.WebProjects |
                                                  FoSolutionExplorerUserControl.TypesFilter.WebForm |
                                                  FoSolutionExplorerUserControl.TypesFilter.FormAction |
                                                  FoSolutionExplorerUserControl.TypesFilter.FormField);
            WinProjectsFoSolutionExplorer.DataBind(solution, FoSolutionExplorerUserControl.TypesFilter.WinProjects |
                                                  FoSolutionExplorerUserControl.TypesFilter.WinForm |
                                                  FoSolutionExplorerUserControl.TypesFilter.FormAction |
                                                  FoSolutionExplorerUserControl.TypesFilter.FormField);
        }
    }
}
